package com.youpingou;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SchedulerTask01 {

    private int count = 0;
    //每六秒钟执行一次
    @Scheduled(cron = "*/6 * * * * ?")
    private void process() {
        System.out.println("定时任务1：" + (count++));
    }
}